import Vue from 'vue'
import Router from 'vue-router'

// import pages
import UserIndex from '@/pages/user/user.vue'
import UserHome from '@/pages/user/home/home.vue'
import UserSociety from '@/pages/user/society/society.vue'
import UserSocietyBak from '@/pages/user/society/societybak.vue'
import 下拉树 from '@/pages/下拉框/树/下拉树.vue'
import 下拉树_引用组件 from '@/pages/下拉框/树/下拉树_引用组件.vue'
import 下拉搜索分页 from '@/pages/下拉框/分页/下拉搜索分页.vue'
import 下拉搜索分页_列表在线编辑 from '@/pages/下拉框/分页/下拉搜索分页_列表在线编辑.vue'
import 下拉搜索分页_列表在线编辑_引用组件 from '@/pages/下拉框/分页/下拉搜索分页_列表在线编辑_引用组件.vue'
import 工具集_解析XML from '@/pages/工具集/工具集_解析XML.vue'
import 工具及_操作数组 from '@/pages/工具集/工具及_操作数组.vue'
import 方法调用监听 from '@/pages/其他/方法调用监听.vue'


Vue.use(Router)


const routes = [
  {
    path: '/',
    redirect: '/xlk/xlsyy'
  },
  {
    path: '/other',
    name: 'other',
    component: UserIndex,
    children: [
      {
        path: 'ffdyjt',
        name: '方法调用监听',
        component: 方法调用监听
      }
    ]
  },
  {
    path: '/tool',
    name: 'tool',
    component: UserIndex,
    children: [
      {
        path: 'xml',
        name: 'xml',
        component: 工具集_解析XML
      },
      {
        path: 'arr',
        name: '工具及_操作数组',
        component: 工具及_操作数组
      }
    ]
  },
  {
    path: '/xlk',
    name: 'UserIndex',
    component: UserIndex,
    children: [
      {
        path: 'xlssfy',
        name: '下拉搜索分页',
        component: 下拉搜索分页
      },
      {
        path: 'xlssfyzxbj',
        name: '下拉搜索分页_列表在线编辑',
        component: 下拉搜索分页_列表在线编辑
      },
      {
        path: 'xlssfyzxbj_yyzj',
        name: '下拉搜索分页_列表在线编辑_引用组件',
        component: 下拉搜索分页_列表在线编辑_引用组件
      },
      {
        path: 'xls',
        name: '下拉树',
        component: 下拉树
      },
      {
        path: 'xlsyy',
        name: '下拉树_引用组件',
        component: 下拉树_引用组件
      },
    ]
  },
  {
    path: '/user',
    name: 'UserIndex',
    component: UserIndex,
    children: [
      {
        path: 'home',
        name: 'UserHome',
        component: UserHome
      },
      {
        path: 'society',
        name: 'UserSociety',
        component: UserSociety
      },
      {
        path: 'societybak',
        name: 'UserSocietyBak',
        component: UserSocietyBak
      }
    ]
  }
]


const router = new Router({
  mode: 'hash',
  routes
})

export default router
